package lab02.Test19;

public class Test {
    public static void main(String[] args) {
        String result = "HelloWord";
        System.out.println("字符窜长度" + result.length());
        char tmp;
        //下标0-字符窜长度-1
        int i;
        for ( i=result.length()-1; i >=0; i--) {
            tmp = result.charAt(i);
            if (tmp >= 'A' && tmp <= 'Z') {
                //强制类型转换
                System.out.print((char) (tmp + 32));
            }
            else if(tmp >= 'a' && tmp <= 'z'){
                System.out.print((char) (tmp-32));
            }
        }
    }
}
